package com.cn.mmd.service;

import com.cn.mmd.model.Answer;
import com.cn.mmd.model.Issue;

import java.util.List;

/**
 * Created by Administrator on 2016/7/19 0019.
 */
public interface IssueStudentService {

    /**
     * 添加
     * @param record
     * @return
     */
    int insertSelective(Issue record);

    /**
     * 查看单条判断是否是唯一
     * @param issue
     * @return
     */
    Issue selectByUrl(Issue issue);

    /**
     * 分页查看全部数据
     * @param issue
     * @return
     */
    List<Issue> selectAllByOd(Issue issue);

    /**
     * 根据问题id查看回答
     * @param answer
     * @return
     */
    List<Answer> selectByIssueIdOd(Answer answer);

    /**
     * 查看单条
     * @param answer
     * @return
     */
    Answer selectByUrl(Answer answer);

    /**
     * 动态添加
     * @param record
     * @return
     */
    int insertSelective(Answer record);

    /**
     * 动态修改问题
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(Issue record);

    /**
     * 动态修改回答
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(Answer record);

    /**
     * 根据问题聚合
     * @param answer
     * @return
     */
    int countNumByIssueId(Answer answer);

    /**
     * 根据问题id查看问题
     * @param issueid
     * @return
     */
    Issue selectByPrimaryKey(Integer issueid);

}
